﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using EzDesk.Apps.Model.Attendance;
using EzDesk.Apps.ServiceImpl.Attendance.Repositories.Interface;
using EzDesk.Apps.ServiceImpl.Repositories.Mock;

namespace EzDesk.Apps.UnitTest
{
    public class Mock_LegalHolidayRepository :
        Mock_Repository<LegalHoliday>, ILegalHolidayRepository
    {
        public LegalHoliday GetLegalHolidayInfo(DateTime date)
        {
            return innerStorage.GetAll()
                .Where(p => p.StartDate <= date && date <= p.EndDate)
                .SingleOrDefault();
        }
    }
}
